package cn.edu.zut.mock;

public class MySQLMockDataGenerator {
    public static void main(String[] args) {
        try {
            // 初始化数据库连接
            DataInserter inserter = new DataInserter("jdbc:mysql://localhost:3306/driver", "root", "20050324");

            // 生成数据
          /*  List<City> cities = DataGenerator.generateCities(10);
            List<PriceRule> priceRules = DataGenerator.generatePriceRules(10);
            List<Driver> drivers = DataGenerator.generateDrivers(10);
            List<Car> cars = DataGenerator.generateCars(10);
            List<Passenger> passengers = DataGenerator.generatePassengers(10);
            List<OrderInfo> orderInfos = DataGenerator.generateOrderInfos(10);
            List<OrderDetail> orderDetails = DataGenerator.generateOrderDetails(10);

*/
            // 插入数据
           /* inserter.insertCities(cities);
            inserter.insertPriceRules(priceRules);
            inserter.insertDrivers(drivers);
            inserter.insertCars(cars);
            inserter.insertPassengers(passengers);
            inserter.insertOrderInfos(orderInfos);
            inserter.insertOrderDetails(orderDetails);
*/
        //    List<Passenger> passengers = PassengerDataGenerator.generateData(10, LocalDateTime.now().minusDays(7), LocalDateTime.now());
            // 关闭连接
            inserter.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
